home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / pcmagwin.zip / MEMCLEAR.ASM < prev    next >
Assembly Source File  |  1992-06-06  |  478b  |  29 lines

  1. ;MEMCLEAR.ASM - clears memory to any value
  2. ;
  3. ;Usage:
  4. ;
  5. ; CALL MemClear(BYVAL Segment%, BYVAL Address%, BYVAL NumBytes%, BYVAL Value%)
  6. ;
  7. ;or
  8. ;
  9. ; CALL MemClear(SEG Array(Start), BYVAL NumBytes%, BYVAL Value%)
  10. ;
  11. ;or
  12. ;
  13. ; CALL MemClear(SEG Variable, BYVAL NumBytes%, BYVAL Value%)
  14.  
  15.  
  16. .Model Medium, Basic
  17. .Code
  18.  
  19. MemClear Proc, Dest:DWord, NumBytes:Word, Value:Word
  20.  
  21.   Les  DI,Dest
  22.   Mov  CX,NumBytes
  23.   Mov  AX,Value
  24.   Rep  Stosb
  25.   Ret
  26.   
  27. MemClear Endp
  28. End
  29.